[C#] Onpaint events (invalidated) changing execution order after a period normal operation (runtime)

Posted by Luke Mcneice on Stack Overflow See other posts from Stack Overflow or by Luke Mcneice
Published on 2010-04-10T22:00:18Z Indexed on 2010/04/10 22:03 UTC
Read the original article Hit count: 378

Filed under:
|
|
|

Hi all,

I have 3 data graphs that are painted via the their paint events. When I have data that I need to insert into the graph I call the controls invalidate() command.

The first control's paint event actually creates a bitmap buffer for the other 2 graphs to avoid repeating a long loop.

So the invalidate commands are in a specific order (1,2,3). This works well, however when the graphed data reaches the end of the graph window (PictureBox) where the data would normally start scrolling, the paint events begin firing in the wrong order (2,3,1).

has anyone came across this before? why might this be happening?

© Stack Overflow or respective owner

Related posts about c#

Related posts about drawing